package com.ruoyi.management.basics.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.management.basics.ro.GetVehiclesInformationListParam;
import com.ruoyi.management.basics.service.ITCarService;
import com.ruoyi.management.basics.vo.GetCompanyListVo;
import com.ruoyi.management.basics.vo.GetFueltypeListVo;
import com.ruoyi.management.basics.vo.GetVehiclesInformationListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;

/**
 * 【请填写功能名称】Controller
 * 
 * @author ruoyi
 * @date 2021-11-30
 */
@Api(tags = "车辆档案管理")
@RestController
@RequestMapping("/car")
public class TCarController extends BaseController {
    @Autowired
    private ITCarService tCarService;

    /**
     * 查询车辆档案信息
     */
    @ApiOperation(value = " 查询车辆档案信息", notes = "查询车辆档案信息")
    @GetMapping("/get_vehicles_information")
    public TableDataInfo getVehicleFileInformation(@Valid GetVehiclesInformationListParam param) {
        startPage();
        List<GetVehiclesInformationListVo> list = tCarService.getVehiclesInformation(param);
        return getDataTable(list);
    }


    /**
     * 查询车辆档案信息
     */
    @ApiOperation(value = " 查询付款的车辆信息", notes = "查询付款的车辆信息")
    @GetMapping("/getCarInfoForPay")
    public AjaxResult getCarInfoForPay(@RequestParam(value = "carNo",name = "carNo") String carNo) {
        AjaxResult ajax = AjaxResult.success();
        return ajax.put("carNo",carNo);
    }
}
